package com.springboot.astra.service.serviceImpl;

import com.springboot.astra.bean.Carousel;
import com.springboot.astra.mapper.CarouselMapper;
import com.springboot.astra.service.CarouselService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CarouselServiceImpl implements CarouselService {
    @Autowired
    CarouselMapper carouselMapper;

    @Override
    public Carousel getOneById(Integer id) {
        return carouselMapper.getOneById(id);
    }

    @Override
    public List<Carousel> getAll() {
        return carouselMapper.getAll();
    }

    @Override
    public void insertCarousel(Carousel carousel) {
        carouselMapper.insertCarousel(carousel);
    }

    @Override
    public void updateOneById(Carousel carousel) {
        carouselMapper.updateOneById(carousel);
    }

    @Override
    public void deleteOneById(Integer id) {
        carouselMapper.deleteOneById(id);
    }
}
